

export default {
    namespaced: true,
    state: {
        list: []
    },
    mutations: {
        jumpShoop(state, value) {
            state.list = value;
        },
        jia(state, item) {
            state.list.forEach(element => {
                if (element.id == item.id) {
                    element.count = ++item.count
                }
            });
        }
    },
    actions: {
        // jia(ctx,value){
        //     let a = ctx.state.list.findIndex(item => item.skuId == value[1])
        //     // console.log(ctx,value);
        //     value.push(a)
        //     ctx.commit("JIA",value)
        // }
    }
}